:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
}

body {
    background: #f5f6fa;
    font-family: 'Segoe UI', sans-serif;
}

.dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
}

h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn.on {
    background: var(--success);
    color: white;
}

.btn.off {
    background: var(--danger);
    color: white;
}

.btn.toggle {
    background: var(--secondary);
    color: white;
    width: 100%;
}

.speed-control {
    margin-top: 1rem;
    width: 100%;
}

select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    width: 100%;
}

.status {
    margin-top: 1rem;
    height: 8px;
    border-radius: 4px;
    background: #eee;
}

.light .status.active { background: var(--success); }
.fan .status.active { background: var(--secondary); }
.face .status.active { background: var(--primary); }